package org.grayrabbit.cloud.core.biz;

import org.grayrabbit.cloud.core.config.ConfiguratorException;
import org.grayrabbit.cloud.core.module.ChannelModule;
import org.grayrabbit.cloud.core.module.ModuleConstructException;
import org.grayrabbit.cloud.core.rpc.Argument;
import org.grayrabbit.cloud.core.rpc.ChannelFactory;
import org.grayrabbit.cloud.core.rpc.Result;

public abstract class BizChannelModule extends
		ChannelModule<Result, Argument> implements BizModule {
	public BizChannelModule() {
	}

	public BizChannelModule(String name, String url)
			throws ModuleConstructException {
		super(name, url);
	}

	public String getChannelUrl() {
		try {
			return ClientUtility.getProperty("module", name, "url");
		} catch (ConfiguratorException e) {
		}
		return null;
	}

	protected ChannelFactory<Result> getChannelFactory() {
		return ClientUtility.getChannelFactory();
	}
}
